import request from '@/utils/request'
import {  commonApiUrl } from '../config'


/**
 * 门户-获取树形列表
 */
export function getHomepageTree(employeeId) {
  return request({
    url: commonApiUrl + `/homepage/getHomepageTree/${employeeId}`,
    method: 'post',
  })
}
/**
 * 门户-分页查询列表
 */
export function findListByMain(data) {
  return request({
    url: commonApiUrl + `/homepage/findListByMain`,
    method: 'post',
    data
  })
}
/**
 * 门户-新增
 */
export function createByMain(data) {
  return request({
    url: commonApiUrl + `/homepage/createByMain`,
    method: 'post',
    data
  })
}
/**
 * 门户-编辑
 */
export function editByMain(data) {
  return request({
    url: commonApiUrl + `/homepage/editByMain`,
    method: 'post',
    data
  })
}
/**
 * 门户-删除
 */
 export function deleteByMain(data) {
    return request({
      url: commonApiUrl + `/homepage/deleteByMain`,
      method: 'post',
      data
    })
  }
/**
 * 门户-详情
 */
 export function findListByMainId(id) {
    return request({
      url: commonApiUrl + `/homepage/findListByMainId/${id}`,
      method: 'get',
    })
  }
/**
 * 门户-首页-获取常用平台
 */
 export function getUsedPlatform(employeeId) {
    return request({
      url: commonApiUrl + `/homepage/getUsedPlatform/${employeeId}`,
      method: 'post',
    })
  }
/**
 * 门户-首页-绑定
 */
 export function bindUser(data) {
    return request({
      url: commonApiUrl + `/homepage/bindUser`,
      method: 'post',
      data
    })
  }